﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="dodajbadaniemoczu.aspx.cs" Inherits="STS.Pacjent.dodajbadaniemoczu" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    Podaj Pesel:
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
&nbsp;
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="OK" />
<br />
    <strong>
<br />
PACJENT:</strong><br />
    <asp:Label ID="imie" runat="server" Text="Label"></asp:Label>
&nbsp;<asp:Label ID="nazwisko" runat="server" Text="Label"></asp:Label>
&nbsp;<asp:Label ID="Pesel" runat="server" Text="Label"></asp:Label>
&nbsp;<asp:Label ID="miasto" runat="server" Text="Label"></asp:Label>
&nbsp;<asp:Label ID="id_pacjenta" runat="server" Text="Label" Visible="False"></asp:Label>
<asp:Label ID="data" runat="server" Text="Label" Visible="False"></asp:Label>
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        DataKeyNames="id_mocz" DataSourceID="SqlDataSource1" DefaultMode="Insert" 
        Height="50px" Width="125px">
        <Fields>
            <asp:BoundField DataField="id_mocz" HeaderText="id_mocz" InsertVisible="False" 
                ReadOnly="True" SortExpression="id_mocz" Visible="False" />
            <asp:BoundField DataField="data_badania" HeaderText="data_badania" 
                SortExpression="data_badania" Visible="False" />
            <asp:BoundField DataField="barwa" HeaderText="barwa" SortExpression="barwa" />
            <asp:BoundField DataField="przejrzystosc" HeaderText="przejrzystosc" 
                SortExpression="przejrzystosc" />
            <asp:BoundField DataField="ciezar_wl" HeaderText="ciezar_wl" 
                SortExpression="ciezar_wl" />
            <asp:BoundField DataField="ph" HeaderText="ph" SortExpression="ph" />
            <asp:BoundField DataField="azotyny" HeaderText="azotyny" 
                SortExpression="azotyny" />
            <asp:BoundField DataField="bialko" HeaderText="bialko" 
                SortExpression="bialko" />
            <asp:BoundField DataField="glukoza" HeaderText="glukoza" 
                SortExpression="glukoza" />
            <asp:BoundField DataField="ciala_ketonowe" HeaderText="ciala_ketonowe" 
                SortExpression="ciala_ketonowe" />
            <asp:BoundField DataField="urobilinogen" HeaderText="urobilinogen" 
                SortExpression="urobilinogen" />
            <asp:BoundField DataField="bilirubina" HeaderText="bilirubina" 
                SortExpression="bilirubina" />
            <asp:BoundField DataField="nablonki_plaskie" HeaderText="nablonki_plaskie" 
                SortExpression="nablonki_plaskie" />
            <asp:BoundField DataField="leukocyty" HeaderText="leukocyty" 
                SortExpression="leukocyty" />
            <asp:BoundField DataField="pasma_slizu" HeaderText="pasma_slizu" 
                SortExpression="pasma_slizu" />
            <asp:BoundField DataField="id_pacjenta" HeaderText="id_pacjenta" 
                SortExpression="id_pacjenta" Visible="False" />
            <asp:BoundField DataField="id_lekarza" HeaderText="id_lekarza" 
                SortExpression="id_lekarza" Visible="False" />
            <asp:CommandField ButtonType="Button" ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MGRConnectionString %>" 
        DataSourceMode="DataReader" 
        DeleteCommand="DELETE FROM [badania_mocz] WHERE [id_mocz] = @id_mocz" 
        InsertCommand="INSERT INTO [badania_mocz] ([data_badania], [barwa], [przejrzystosc], [ciezar_wl], [ph], [azotyny], [bialko], [glukoza], [ciala_ketonowe], [urobilinogen], [bilirubina], [nablonki_plaskie], [leukocyty], [pasma_slizu], [id_pacjenta], [id_lekarza]) VALUES (@data_badania, @barwa, @przejrzystosc, @ciezar_wl, @ph, @azotyny, @bialko, @glukoza, @ciala_ketonowe, @urobilinogen, @bilirubina, @nablonki_plaskie, @leukocyty, @pasma_slizu, @id_pacjenta, @id_lekarza)" 
        SelectCommand="SELECT * FROM [badania_mocz]" 
        UpdateCommand="UPDATE [badania_mocz] SET [data_badania] = @data_badania, [barwa] = @barwa, [przejrzystosc] = @przejrzystosc, [ciezar_wl] = @ciezar_wl, [ph] = @ph, [azotyny] = @azotyny, [bialko] = @bialko, [glukoza] = @glukoza, [ciala_ketonowe] = @ciala_ketonowe, [urobilinogen] = @urobilinogen, [bilirubina] = @bilirubina, [nablonki_plaskie] = @nablonki_plaskie, [leukocyty] = @leukocyty, [pasma_slizu] = @pasma_slizu, [id_pacjenta] = @id_pacjenta, [id_lekarza] = @id_lekarza WHERE [id_mocz] = @id_mocz">
        <DeleteParameters>
            <asp:Parameter Name="id_mocz" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:ControlParameter ControlID="data" DefaultValue="" Name="data_badania" 
                PropertyName="Text" Type="String" />
            <asp:Parameter Name="barwa" Type="String" />
            <asp:Parameter Name="przejrzystosc" Type="String" />
            <asp:Parameter Name="ciezar_wl" Type="Double" />
            <asp:Parameter Name="ph" Type="Double" />
            <asp:Parameter Name="azotyny" Type="String" />
            <asp:Parameter Name="bialko" Type="String" />
            <asp:Parameter Name="glukoza" Type="String" />
            <asp:Parameter Name="ciala_ketonowe" Type="String" />
            <asp:Parameter Name="urobilinogen" Type="String" />
            <asp:Parameter Name="bilirubina" Type="String" />
            <asp:Parameter Name="nablonki_plaskie" Type="String" />
            <asp:Parameter Name="leukocyty" Type="Double" />
            <asp:Parameter Name="pasma_slizu" Type="String" />
            <asp:ControlParameter ControlID="id_pacjenta" DefaultValue="" 
                Name="id_pacjenta" PropertyName="Text" Type="Int32" />
            <asp:CookieParameter CookieName="id" Name="id_lekarza" Type="Int32" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="data_badania" Type="String" />
            <asp:Parameter Name="barwa" Type="String" />
            <asp:Parameter Name="przejrzystosc" Type="String" />
            <asp:Parameter Name="ciezar_wl" Type="Double" />
            <asp:Parameter Name="ph" Type="Double" />
            <asp:Parameter Name="azotyny" Type="String" />
            <asp:Parameter Name="bialko" Type="String" />
            <asp:Parameter Name="glukoza" Type="String" />
            <asp:Parameter Name="ciala_ketonowe" Type="String" />
            <asp:Parameter Name="urobilinogen" Type="String" />
            <asp:Parameter Name="bilirubina" Type="String" />
            <asp:Parameter Name="nablonki_plaskie" Type="String" />
            <asp:Parameter Name="leukocyty" Type="Double" />
            <asp:Parameter Name="pasma_slizu" Type="String" />
            <asp:Parameter Name="id_pacjenta" Type="Int32" />
            <asp:Parameter Name="id_lekarza" Type="Int32" />
            <asp:Parameter Name="id_mocz" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
<br />
</asp:Content>
